package ningbo.day04.method;

/**
 * @Author 宁铂
 * @Date 2021/7/18 10:32
 * @Version 1.0
 */
public class TestMethod {
    /** 测试方法的调用顺序/参数/返回值 */
    public static void main(String[] args) {
        System.out.println(1);
        method();
        System.out.println(2);
        method2(3);
        int result = method3(1,2);
        System.out.println(result);
    }

    private static int method3( int a,int b) {
        return a+b;
    }

    private static void method2(int i) {
        System.out.println("海绵宝宝今年:"+ i +"岁啦~");
    }

    private static void method() {
        System.out.println(5);
        System.out.println(6);
        System.out.println(7);
    }
}
